home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / program / swagd_f.zip / DOS.SWG / 0080_Quarterdeck Approved Reboot Method.pas < prev    next >
Pascal/Delphi Source File  |  1995-03-03  |  582b  |  30 lines

  1. (*
  2. I asked Quarterdeck's tech support about the reboot sequence I use, which
  3. flushes buffers before booting, and they recommended also setting the stack
  4. to non-mappable memory when booting from a DESQview window (the lines below
  5. marked by {*}
  6. *)
  7.  
  8. program boot;
  9. procedure ReBoot; far; assembler;
  10. asm
  11.   mov   ah, 0Dh
  12.   int   21h
  13.   xor   cx, cx
  14. @1:
  15.   push  cx
  16.   int   28h
  17.   pop   cx
  18.   loop  @1
  19.   mov   ds, cx
  20.   mov   word ptr [472h], 1234h
  21.   mov   ss, cx          {*}
  22.   mov   sp, 700h        {*}
  23.   dec   cx
  24.   push  cx
  25.   push  ds
  26. end;
  27. begin
  28.   ReBoot;
  29. end.
  30.